package com.fengxu.gamescript.jsengine.core;

/**
 * Js运行日志
 */
public class JsRunnerLog {

    /**
     * 日志等级
     */
    public enum LogLevel{
        Info,   // 普通日志
        Error,   // 错误日志
        System,  // 系统日志
    }

    /**
     * 该条js日志所属的jsRunner的标识
     */
    private String name;

    /**
     * 该条日志产生的时间
     */
    private Long logTime;

    /**
     * 日志等级
     */
    private LogLevel logLevel;

    /**
     * 日志消息
     */
    private String msg;

    public JsRunnerLog(String name, LogLevel logLevel, String msg) {
        this.name = name;
        this.logTime = System.currentTimeMillis();
        this.logLevel = logLevel;
        this.msg = msg;
    }

    public Long getLogTime() {
        return logTime;
    }

    public LogLevel getLogLevel() {
        return logLevel;
    }

    public String getMsg() {
        return msg;
    }

    public void setLogLevel(LogLevel logLevel) {
        this.logLevel = logLevel;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
